﻿#ifndef _CBAK_INFO_H_
#define _CBAK_INFO_H_
#include <stdint.h>

//CALLBACK_ID_FS_DISK_FULL,
//param

typedef struct _CBAK_DISK_FULL_
{
	int ch;
	int diskIndex;//刚录像满的磁盘索引号
}CBAK_DISK_FULL;

//param CALLBACK_ID_FS_RECORD_STATUS,	//录像状态
typedef struct _CBAK_REC_STATUS_
{
	int ch;
	int recType;			//FS_RECORD_TYPE
	char file_name[64];     //录像文件名称
	int diskLeaf;           //磁盘剩余
}CBAK_REC_STATUS;

//CALLBACK_ID_FS_DISK_ACTIVE
typedef struct _CBAK_DISK_ACTIVE_
{
	int curIndex;			//当前录像的磁盘号
	int diskNum;			//硬盘总个数

}CBAK_DISK_ACTIVE;

//CALLBACK_ID_FS_DISK_LOST　 回调　磁盘丢失
typedef struct _CBAK_DISK_LOST_
{
	int diskIndex;
	int reserve;			//FS_RECORD_TYPE
}CBAK_DISK_LOST;

//CALLBACK_ID_FS_DISK_ERROR　回调 磁盘错误
typedef struct _CBAK_DISK_ERROR_
{
	int diskIndex;
	int reserve;			//FS_RECORD_TYPE
}CBAK_DISK_ERROR;

//CALLBACK_ID_FS_BAK_PROGRESS	//回调备份进度
typedef struct _CBAK_BACKUP_PROGRESS_
{
	int progress;				//备份进度
	int ret;					//-1
}CBAK_BACKUP_PROGRESS;


//CBAK_FORMAT_PROGRESS  格式化进度,目前格式化都比较快，进度条作用不大
typedef struct _CBAK_FORMAT_PROGRESS_
{   
	int diskNo;					//磁盘编号
	int progress;				//备份进度
	int ret;					//-1
}CBAK_FORMAT_PROGRESS;

#define CALLBACK_PARAM_MAX_LEN			(1024)

typedef void (*STORAGE_STATUS_CBAK)(uint32_t id, const char* param, uint32_t paramLen);

typedef enum 
{
	CALLBACK_ID_FS_STORAGE_BEGIN= 0x8000,							
	CALLBACK_ID_FS_DISK_ACTIVE  = CALLBACK_ID_FS_STORAGE_BEGIN + 1,	//磁盘激活　	//IFsApiStorage::CBAK_DISK_ACTIVE
	CALLBACK_ID_FS_DISK_FULL	= CALLBACK_ID_FS_STORAGE_BEGIN + 2, //磁盘满了  	//IFsApiStorage::CBAK_DISK_FULL
	CALLBACK_ID_FS_RECORD_STATUS= CALLBACK_ID_FS_STORAGE_BEGIN + 3, //录像状态  	//IFsApiStorage::CBAK_REC_STATUS
	CALLBACK_ID_FS_DISK_LOST	= CALLBACK_ID_FS_STORAGE_BEGIN + 4,	//磁盘丢失  	//IFsApiStorage::CBAK_DISK_LOST
	CALLBACK_ID_FS_DISK_ERROR   = CALLBACK_ID_FS_STORAGE_BEGIN + 5, //磁盘错误  	//IFsApiStorage::CBAK_DISK_ERROR
	CALLBACK_ID_FS_BAK_PROGRESS = CALLBACK_ID_FS_STORAGE_BEGIN + 6,	//备份进度  	//IFsApiStorage::CBAK_BACKUP_PROGRESS
	CALLBACK_ID_FS_FORMAT       = CALLBACK_ID_FS_STORAGE_BEGIN + 7,	//格式化硬盘  	//IFsApiStorage::CBAK_FORMAT_PROGRESS
}CALLBACK_ID;
#endif